Learn how to write JSON templates for adding query parameters to a search when applying rules.
FACET:VALUE
refers to a facet-value pair, such as, author:shakespeare
.
Scenario | JSON template |
---|---|
Select a category | { "filters":"FACET:VALUE" } |
Remove a category | { "filters":"NOT FACET:VALUE" } |
Remove several categories | { "filters":"NOT FACET:VALUE AND NOT FACET:VALUE" } |
VALUE
(such as William Shakespeare), wrap it in single quotes. For example:
VALUE
contains an apostrophe (such as Tony d’Arbon), escape the apostrophe with double backslashes and wrap the whole string in single quotes. For example:
VALUE
with single quotes if it contains spaces.
For example: